home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2004 #9
/
Amiga Plus CD - 2004 - No. 09.iso
/
amigaplus
/
tools
/
amigaos4_only
/
ifxlite
/
imagefx3
/
rexx
/
snapshot.ifx
< prev
next >
Wrap
Text File
|
2004-08-03
|
2KB
|
86 lines
/*
* $VER: Snapshot 2.0.0 (19.8.94)
*
* Arexx program for the ImageFX image processing system.
* Written by Thomas Krehbiel (from an idea by Bob Fisher)
*
* Take a directory of images, and reduce them to small thumbnail
* snapshot images, and place them on one or more images which are
* then saved out somewhere. This script also renders the snapshot
* pages down to 16 color images for easy viewing. We can also
* optionally stamp the name of the file at the bottom of each
* thumbnail.
*
* By default we make 640x400 24-bit renderings with a 5x5 grid
* of thumbnails.
*
*/
OPTIONS RESULTS
SIGNAL ON BREAK_C
GetMain
IF rc = 0 THEN DO
RequestResponse 'The current buffer will be destroyed.'
IF rc ~= 0 THEN EXIT
END
KillBuffer Force
/* retreive defaults from any previous useage of this macro */
defsdir = GETCLIP('IFX_Snapshot_DefSource')
defspat = GETCLIP('IFX_Snapshot_DefSrcPat')
/* some defaults - change as desired */
IF defsdir = '' THEN defsdir = "" /* default source dir */
IF defspat = '' THEN defspat = "#?" /* default source pattern */
RequestFile '"Source Directory:"' '"'defsdir'"' '" "' '"'defspat'"'
IF rc ~= 0 THEN EXIT /* cancelled */
sourcedir = filereq.path
sourcepat = filereq.pat
Rx Snapshot_Gui
DO FOREVER
Message 'Building list of files...'
/* build list of files to process */
ECHO 'List >RAM:__Snap_TEMP__ NOHEAD LFORMAT='sourcedir'/%s' sourcedir 'PAT' sourcepat
ADDRESS COMMAND 'List >RAM:__Snap_TEMP__ NOHEAD LFORMAT='sourcedir'/%s' sourcedir 'PAT' sourcepat
IF rc ~= 0 THEN DO
RequestNotify 'Problem scanning the source directory.'
EXIT
END
/* sort alphabetically */
ADDRESS COMMAND 'Sort RAM:__Snap_TEMP__ TO RAM:__Snap_LIST__'
ADDRESS COMMAND 'Delete RAM:__Snap_TEMP__ QUIET'
/* okay, process the files */
Rx Snapshot_Engine sourcedir 'RAM:__Snap_LIST__'
RequestResponse 'Please insert next volume.'
IF rc ~= 0 THEN LEAVE
END
BREAK_C:
ADDRESS COMMAND 'Delete RAM:__Snap_LIST__ QUIET'
KillBuffer Force
KillBrush
Undo On
Redraw On
Requesters On
Redraw
EXIT